package com.xc.hotelmgr.consumermq.utils;

import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;

public class HttpClient {

    /**
     * post提交
     * @param o
     * @param url
     * @return
     */
    public static String doPost(Object o, String url) {
        String pushData = JSON.toJSONString(o);
        return HttpRequest.post(url).timeout(1000000)
                .body(pushData).timeout(100000)
                .execute(false)
                .body();
    }
}
